package com.hht.baselibrary;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

/**
 * Author: chenhu
 * Time: 2021/4/26 9:49
 * Description do somethings
 */
public abstract class BaseActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getLayoutResID() < 1) {
            new NullPointerException("layout is not null");
        }
        setContentView(getLayoutResID());
        initView();
    }

    public abstract int getLayoutResID();

    public abstract void initView();
}
